In the field of computer graphics, it is well known to generate shadows for objects illuminated by virtual light sources. This feature plays an important role in bringing realism to computer-generated images by enhancing the perceptibility of depth in a scene. In other words, shadows make it easier to understand what depth objects have and how they are located in relation to each other in space.
A scene is commonly defined as a number of three dimensional (3D) objects and light sources. A viewer views the scene from a point of view. The viewer is sometimes called a “camera”. A scene is rendered into an image. In the field of computer graphics, rendering means to calculate an image. In this context, rendering is the process of computing an image depicting the scene as it would be seen from the viewer's (camera's) point of view. A motion picture or video can be created by rendering a plurality of consecutive images and moving the objects and/or the viewer/camera between the renderings.
There are computer programs available on the market for building scenes by allowing a user to insert 3D objects at 3D positions. There are other computer programs available on the market which automatically can add shadows to 3D objects. For example, there are computer programs allowing a user to assign a 3D object a position and to move a virtual light source in relation to that position so as to fictitiously illuminate the object from a desired direction. The computer program may then automatically generate a shadow of the object based on the shape of the object and the relative positions of the object and the virtual light source.
There are also computer programs for generating a plurality of objects in the form of small sized particles intended to animate snow, rain, water, smoke or the like. This type of computer programs are sometimes referred to as particle animation systems. An example of a particle animation system is Trapcode Particular™, developed by Trapcode AB. In a particle animation system the user assigns rules to a group of objects so that they do not need to be individually positioned and oriented. Instead, the computer calculates their position based on the assigned rules. In the case of motion picture and video, the computer calculates the position of the group of objects over time. Particle animation systems are hence useful for creating scenes with very many objects where it would be impractical to position each object individually. Each particle is assigned, by the computer program, a 3D position, and it may also be assigned other properties, such as velocity, orientation, rotational velocity etc. There are also particle animation systems allowing the user to insert light sources to the scene by specifying 3D positions for one or several light sources in the scene. Some particle animation systems even include functionality for adding shadow effects to a scene comprising light sources.
However, the task of automatically generating realistic shadows for objects in a scene is a complex task which typically requires a lot of computational power. Known computer programs offering this functionality use methods which are either too complex and make image rendering slow, especially for scenes with many objects, or which produce an unsatisfactory result making the rendered images look unrealistic.
There is hence a desire for a fast and simple method for realistic shadowing of objects in computer-generated scenes.